import { Injectable } from '@angular/core';
import { ZeprideTemplateComponent } from '../models';
import { BaseService } from './base.service';

@Injectable({
  providedIn: 'root'
})
export class TemplateService extends BaseService {

  getTemplates() {
    const url = 'api/template';
    return this.get(url);
  }

  getTemplateItem(templateItemId: string): Promise<ZeprideTemplateComponent> {
    const url = `api/tmpComItem/${templateItemId}`;
    return this.get(url);
  }
}
